package ipad.asia.dao;

import ipad.asia.entity.PunishEnterprise;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PunishEnterpriseDao extends JpaRepository<PunishEnterprise,Long> {
    /**
     * 一般投诉是投诉店铺的
     * @return
     */
    List<PunishEnterprise> findAll();
    PunishEnterprise findById(int id);
    List<PunishEnterprise> findByShopId(int shopId);
    @Modifying
    @Query("update PunishEnterprise set statues=?1,serious=?2,result=?3 where id=?4")
    void update(int statues,int serious,String result,int id);
}
